pub fn convert_base(num_str: &str, to_base: u32) -> String {

    // Parse number and base:
    let num = num_str.split('(').next().unwrap();
    let base = num_str.split('(').nth(1).unwrap().split(')').next().unwrap();
    let base = base.parse().unwrap();
    let num = u32::from_str_radix(num, base).unwrap();

    let mut result = String::new();
    let mut n = num;
    while n > 0 {
        let digit = n % to_base;
        result.push(std::char::from_digit(digit, to_base).unwrap());
        n /= to_base;
    }

    result.chars().rev().collect()
}
